<%@ page language="java" contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">

<head>
<title>飞腾会-FitaClub</title>
<%@ include file="/WEB-INF/include/meta.jsp"%>
<%@ include file="/WEB-INF/include/css.jsp"%>
</head>
<!-- end header -->

<body>
  <div class="page-group">
    <div class="page page-current agent-page bg-light-gray">
      <header class="bar bar-nav fita-header">
        <a href="javascript:history.back(-1);" class="icon icon-left pull-left"></a> 
        <a class="icon icon-menu pull-right open-panel"></a>
        <h1 class="title">申请</h1>
      </header>

      <div class="bar bar-footer fita-footer ">
        <a id="submit"  data-shift-submit="true"   class="button ">提交申请</a>
      </div>
      <div class="content" >
    
        <form method="POST" action="${ctx.host}/agent-applies">
          <!-- <div class="list-block"
            style="margin: .5rem 0; background: #ffffff;">
            <div class="item-content">
              <div class="item-inner">
                <div class="item-title" style="font-weight: bold;">申请：</div>
                <div class="item-after" style="font-size: .75rem;">客服热线：+86-021-400-8000-2342</div>
              </div>
            </div>
          </div> -->

          <input type="hidden" name="primaryAgentId" value="${primaryAgentId}">
          <input type="hidden" name="rate" value="${rate}">


          <div class="user-info" style="margin-top: .5rem;">
            <div class="box">
              <div class="item">
                <span><span class="company"></span>*公司名称：</span> <input type="text"  name="companyName">
              </div>
<!--               <div class="item">
                <span>*公司/个人：</span> 
                 <div class="item-input">
                <input type="text" id="agentType"  value="" placeholder="请选择类型" />
                <input type="hidden"  name="type">
                </div>
              </div> -->
              <input type="hidden"  name="type" value="COMPANY">

              <c:if test="${empty primaryAgent}">
                <div class="item">
                  <span>*关联分区：</span>
                  <a href="#" class="item-input open-popup" data-popup=".drop-off-popup">
                    <input type="text"  class="drop-off-val" value="" placeholder="请选择分区" readonly>
                    <input type="hidden" name="districtId"  class="drop-off-id">
                  </a>
                </div>
              </c:if>
              <c:if test="${not empty primaryAgent}">
                <input type="hidden" name="districtId"  value="${primaryAgent.district.id}">
              </c:if>

              <div class="item">
                <span>*操作人姓名：</span> <input type="text" value="" name="name">
              </div>
              <div class="item">
                <span>*手机：</span> <input type="text" value="" name="mobile">
              </div>
              <div class="item">
                <span>*Email：</span> <input type="text" value="" name="email">
              </div>
            </div>

          </div>
          <div class="list-block"
            style="margin: .5rem 0; background: #ffffff;">
            <div class="item-content">
              <div class="item-inner">
                <!-- <div class="item-title" style="font-weight: bold;">申请：</div> -->
                <a href="tel:+81-21-63758388" style="font-size: .65rem;color: #2b2b2b">客服热线：+86-21-63758388</a>
              </div>
            </div>
          </div>
          <div
            style="margin: 1rem .5rem; font-weight: bold; font-size: .65rem; color: #262626;">
            <p style="margin-top: 0; margin-bottom: .25rem;">*请挑选离您所在地最近的分区，分区仅用于我公司内部 维护客户所用</p>
            <p style="margin-top: 0; margin-bottom: .25rem;">*申请递交后，我公司会尽快跟您取得联系</p>
          </div>
        </form>
      </div>
      <div class="popup drop-off-popup">
        <div class="content-block">
          <div class="list-block contacts-block">
            <div class="list-group">
            <ul>
                <c:forEach var="district" items="${district}">
                <li>
                  <div class="item-content">
                    <div class="item-inner">
                      <div class="item-title" data-id="${district.id}" data-name="${district.name}">
                      ${district.name}
                      </div>
                   </div>
                  </div>
                 </li>
                </c:forEach>
                </ul>
            </div>
          </div>
        </div>
      </div>
      <!-- <div class="content">
        <p>添加人信息填写页面</p>
        <a ctx.host="/agent-apply/agent-apply-result">递交申请</a>
      </div> -->
    </div>
    
    <div class="panel-overlay"></div>
    <div class="panel panel-right panel-cover fita-panel">
      <div class="list-block contacts-block no-margin">
        <p class="menu-title close-panel">关闭</p>
	      <ul>
	        <li>
	          <a href="${ctx.host}/cars/search" class="item-content item-link">
	            <div class="item-inner">
	              <div class="item-title">立即租车</div>
	            </div>
	          </a>
	        </li>
	        <li>
	          <a href="${ctx.host}/profile" class="item-content item-link">
	            <div class="item-inner">
	              <div class="item-title">个人中心</div>
	            </div>
	          </a>
	        </li>
	      </ul>
      </div>
    </div>
  </div>
  <%@ include file="/WEB-INF/include/script.jsp"%>
 <d:resource type="script" root="${ctx.resource}/build" src="js/page/agent-apply/agent-apply.js" /> 
 <script type="text/javascript">
 require(['page/agent-apply/agent-apply'], function(page) {
	
	 page.init({
		 /* 'jsConfig': JSON.parse(jsConfig),
		 'redirectUrl':'${redirectUrl}'  */
	 })
   })
  </script>
</body>
</html>